package com.bw.zg3park2212.apply

import android.widget.TextView
import com.bw.base.entity.OrderEntityItem
import com.bw.base.entity.RepairEntityItem
import com.bw.zg3park2212.R
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder

class InsApdpter : BaseQuickAdapter<OrderEntityItem, BaseViewHolder>(R.layout.item_park_apply) {
    override fun convert(helper: BaseViewHolder, item: OrderEntityItem) {
        helper.setText(R.id.type,"巡更申请")
        helper.setText(R.id.content,item.content)
        helper.setText(R.id.time,item.appointmentTime)
        val status = helper.getView<TextView>(R.id.sutae)
        if (item.status=="新建"){
            status.text="待审核"
            status.setTextColor(context.resources.getColor(R.color.color_weihu))
        }else if (item.status=="已完成"){
            status.text="已通过"
            status.setTextColor(context.resources.getColor(R.color.color_kongxian))
        }else if (item.status=="进行中"){
            status.text="进行中"
            status.setTextColor(context.resources.getColor(R.color.color_red))
        }
    }
}